﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModalDialog_Debug.aspx.cs" Inherits="CustomControlPractice.ModalDialog_Debug" %>
<%@ Register assembly="CustomControlPractice" namespace="CustomControlPractice.Controls.ModalDialog" tagprefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Modal Dialog</title>
    <script src="js/jquery-1.4.3.min.js" type="text/javascript"></script>
    <script src="Controls/ModalDialog/ModalDialog.js" type="text/javascript"></script>
    <link href="Controls/ModalDialog/ModalDialog.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        var clientID = "<%=btnSubmit.ClientID %>"
        function CloseWindow() {
            alert("Closing");
        }
        function RaiseEvent() { 
            eval(<%=serversideEvent %>);
        }
        $(document).ready(function(){
            $("#container").append($("#" + clientID));
        });
    </script>
</head>
<body>
    <form id="form" runat="server">
    <div>
        <input type="button" onclick="javascript:$.modaldialog.showNewPage('Default.aspx?ID=1','Create Remote Diagnosis' );" value="ShowDialog" />
        <asp:Button ID="btnSubmit" runat="server" Text="Button" OnClick="OnButtonClick" OnClientClick="RaiseEvent();" />
        <input type="button" value="Raise Server event" onclick="javascript:eval(<%=serversideEvent %>);" />
        <input type="button" value="Show Dialog created in current page" onclick="javascript:$.modaldialog.show($('#content'),'Create Remote Diagnosis');" />
    </div>
    <div id="content" style="height:200px;width:400px;">
        <textarea id="TextArea1" cols="20" rows="2"></textarea>
    </div>
    <cc1:ModalDialog ID="ModalDialog1" runat="server">
        <Content>
            <div></div>
        </Content>   
    </cc1:ModalDialog>

    </form>
    
</body>
</html>
